class JQProductAttrListService extends global.JQService {
	
    async do_action(){
		
		if(!this.conn)console.log('do_action::conn error');
		let data_obj = this.req_obj.data_obj;
		if(!data_obj || !data_obj.obj ){
			throw {'code':global.consts.Error.ERROR_PARAM,
				'message':global.consts.Message.ERROR_PARAM};
		}
		let obj = data_obj.obj;
		let inst = global.JQTableIF.instance('cp_attribution_table',this.conn);
		
		let wrap = {};
		console.log('do_action 11111' + JSON.stringify(obj));

		// let menu_id = data_obj?data_obj.menu_id:null;
		let params=[['cp_id=',obj.cp_id ],['attr_type=',obj.attr_type],['attr_status!=',-1]];
		console.log('do_action 22222' + JSON.stringify(params));
		
		//async query2(alias_keys,alias_a_keys, a_keys,a_params, b_table,alias_b_keys,b_keys,b_params,joint,on_a,on_b,params, first,size,group_by,order_by,is_count){}//(alias_a_keys, a_keys,a_params,alias_b_keys, b_table,b_keys,b_params,joint,on_a,on_b,params, first,size,group_by,order_by,is_count){}
		let list = await inst.query(null,params,0,1000,null,'sort desc');
		   
		wrap.list=list;
		// wrap.total=count;
		return wrap;			
	}

}
module.exports = JQProductAttrListService;


